Skip to content

Unify coordinate spaces between AgentLayer and CognitiveWaveform (PHO-6)#15

Merged
wow-miley merged 1 commit intomainfrom
email/pho-6-phosphor-unify-coordinate-spaces-between-agentlayer-and
Mar 5, 2026
Merged

Unify coordinate spaces between AgentLayer and CognitiveWaveform (PHO-6)#15
wow-miley merged 1 commit intomainfrom
email/pho-6-phosphor-unify-coordinate-spaces-between-agentlayer-and

Conversation

@wow-miley
Copy link
Contributor

Summary

Resolves PHO-6 by defining an explicit coordinate-space contract and implementing conversion utilities. The waveform now correctly handles agents positioned in either WORLD_CENTERED or WORLD_POSITIVE coordinate spaces, ensuring visual alignment of peaks with agent nodes on all rendering surfaces.

Changes

  • New coordinate package with CoordinateSpace enum and CoordinateTransform utilities for bidirectional conversion between coordinate spaces
  • CognitiveWaveform now accepts agentCoordinateSpace parameter; addAgentPeak and addFlowRidges normalize agent positions before comparison
  • AgentLayer declares its coordinate space via read-only property; 3D layouts return WORLD_CENTERED, 2D layouts return WORLD_POSITIVE
  • New accessors getAgentPositionIn and getAgentPosition3DIn on AgentLayer for converting positions to any target space
  • Comprehensive tests covering round-trip conversion, peak alignment, and full-scene regression

All changes are additive with backward-compatible defaults; no existing behavior changed.

🤖 Generated with Claude Code

Define CoordinateSpace enum (WORLD_CENTERED, WORLD_POSITIVE) and
CoordinateTransform utilities for converting positions between spaces.
Integrate into CognitiveWaveform to normalize agent positions before
peak/ridge calculations. Add coordinateSpace property to AgentLayer with
getAgentPositionIn/getAgentPosition3DIn accessors. All changes are additive
with backward-compatible defaults. Includes comprehensive unit tests and
full-scene integration tests verifying heightfield consistency across
coordinate spaces.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@wow-miley wow-miley merged commit f75f37c into main Mar 5, 2026
1 check passed
@wow-miley wow-miley deleted the email/pho-6-phosphor-unify-coordinate-spaces-between-agentlayer-and branch March 5, 2026 03:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant